using System.ComponentModel.DataAnnotations;
using LiteDB;
using PHMEE.Diagnosis;

namespace PHMEE.VibrationDataGenerator.Data;

public class TaskConfig
{
    public ObjectId Id { get; set; } = null!;

    [Required]
    public string Name { get; set; } = null!;

    [Required]
    public string CronExpression { get; set; } = null!;

    [Required]
    public AlarmLevel AlarmLevel { get; set; }
    
    public ObjectId ChannelConfigId { get; set; } = null!;

    public VibDataGenerateTaskStatus Status { get; set; } = VibDataGenerateTaskStatus.Stopped;

    public DateTime CreatedTime { get; set; }
}

public enum VibDataGenerateTaskStatus
{
    Stopped = 0,
    Running = 1,
}